import Taro, { Component, Config } from '@tarojs/taro'
import { ComponentClass } from 'react'  //导入这个是需用到状态管理格式
import { View, Text } from '@tarojs/components'

type PageOwnProps = {}
type PageState = {
  pagename: string
}
type Iprops = PageOwnProps

interface Mine {
  props: Iprops;
  state: PageState
}

class Mine extends Component {
  constructor(props){
    super(props);
    this.state = {
      pagename: '我的'
    }
  }
  config: Config = {
    navigationBarTitleText: '我的',
    navigationBarBackgroundColor: '#282e3e',
    navigationBarTextStyle: "white",
  }

  render() {
    return (
      <View>
        <Text>
          这是{this.state.pagename}页面
        </Text>
      </View>
    )
  }
}

export default Mine as ComponentClass<PageOwnProps,PageState>